<?php


namespace App\Common;


trait GlobalDMCode
{
    public function code10000(string $txt="成功",array $data=[]):array
    {
        $msg['code'] = 10000;
        $msg['msg'] = $txt;
        $msg['data'] = $data;
        return $msg;
    }

    public function code10001(string $txt="失败",array $data=[]):array
    {
        $msg['code'] = 10001;
        $msg['msg'] = $txt;
        $msg['data'] = $data;
        return $msg;
    }
}
